<html>
<head>
<title>Listing 9.11. Handling the Blur Event</title>
</head>

<body>

<form>
Field 1:<br>
<input type="text" name="Field1" onBlur="blur_handler(this)">
<p>
Field 2:<br>
<input type="text" name="Field2" onBlur="blur_handler(this)">
</form>

<script language="JavaScript" type="text/javascript">
<!--

function blur_handler(text_field) {
    if (text_field.value == "") {
        alert("Please enter a value")
        text_field.focus()
}
}

//-->
</script>

</body>
</html>

